﻿@{
    ViewBag.Title = "Throttling";
}

<h2>Throttling Links</h2>
Crawler should find 24 pages (this page + 23 links). All of the links below will return a 200 status on a perfect throttling implementation.<br />
@{int linkCount = 1;}

@for (int i = 0; i < 15; i++ )
{
    if( (i % 3) == 0)
    {
        @Html.ActionLink(linkCount + ": 200 status page", "Status200", "HttpResponse", new { guid = Guid.NewGuid().ToString()}, null)<br />   
    }
    else if ((i % 5) == 0)
    {
        @Html.ActionLink(linkCount + ": If requested before 10 seconds pass in between requests, then will 503", "Handle1RequestEveryXSeconds", new { seconds = 10, guid = Guid.NewGuid().ToString() })<br />
    } 
    else
    {
        @Html.ActionLink(linkCount + ": If requested before 3 seconds pass in between requests, then will 503", "Handle1RequestEveryXSeconds", new { seconds = 3, guid = Guid.NewGuid().ToString() })<br />
        linkCount++;
        @Html.ActionLink(linkCount + ": If requested before 1 second passes in between requests, then will 503", "Handle1RequestEveryXSeconds", new { seconds = 1, guid = Guid.NewGuid().ToString() })<br />
    }
    
    linkCount++;
 } 